package com.iwop.moto.controller.web;

import com.iwop.moto.controller.BaseController;
import com.iwop.moto.model.FCouponLimit;
import com.iwop.moto.model.ResultModel;
import com.iwop.moto.service.FCouponLimitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author czq
 * @version 1.0
 * @created 2017/3/30 0030.
 */
@Controller
@RequestMapping("platform")
public class FCouponLimitController extends BaseController {

    @Autowired
    FCouponLimitService fCouponLimitService;

    @RequestMapping(value = "/CouPonLimit/list", method = RequestMethod.GET)
    @ResponseBody
    public ResultModel getList() {
        List<FCouponLimit> fCouponLimits = null;
        try {
            fCouponLimits = fCouponLimitService.listCouponLimit();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return getSucceed(fCouponLimits);
    }

}
